import React from "react";
import { useState } from "react";
export default function InputBase(props) {
  const [value, setValue] = useState(props.defaultValue || "");

  const onChange = (e) => {
    setValue(e.target.value);
    props.onChange && props.onChange(e.target.value);
  };
  return (
    <div>
      <input
        type="text"
        value={value}
        placeholder={props.placeholder}
        onChange={(e) => onChange(e)}
      />
    </div>
  );
}
